package com.cowin.inf.controller;

import com.cowin.base.result.Result;
import com.cowin.base.result.ResultGenerator;
import com.cowin.base.BaseController;
import com.cowin.inf.model.KyDeviceState;
import com.cowin.inf.model.vo.KyDeviceStateVo;
import com.cowin.inf.service.KyDeviceStateService;
import org.springframework.web.bind.annotation.*;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by  on 2020/04/10.
 *
 * @author CodeGenerator
 */
@Slf4j
@RestController
@RequestMapping("/ky/device/state")
public class KyDeviceStateController extends BaseController<KyDeviceState> {
    @Resource
    private KyDeviceStateService kyDeviceStateService;


    @GetMapping("/pmc/{workShopNo}")
    public Result pmcMonitor(@PathVariable String workShopNo) {
          List<KyDeviceStateVo> list = kyDeviceStateService.pmcMonitor(workShopNo);
        return ResultGenerator.genSuccessResult(list);
    }
}
